import request from '@/utils/request'

export async function getProjectPlanBaseListApi(params) {
  var resp = await request({
    url: '/projectbase/projectplanbase/',
    method: 'get',
    params
  })
  return resp;
}

export async function createProjectPlanBaseApi(data) {
  var resp = await request({
    url: '/projectbase/projectplanbase/',
    method: 'post',
    data
  })
  return resp
}

export async function updateProjectPlanBaseApi(id, data) {
  var resp = await request({
    url: '/projectbase/projectplanbase/' + id + '/',
    method: 'put',
    data
  })
  return resp
}

export async function deleteProjectPlanBaseApi(id) {
  var resp = await request({
    url: '/projectbase/projectplanbase/' + id + '/',
    method: 'delete'
  })
  return resp
}

export async function releaseProjectPlanBaseApi(id) {
  var resp = await request({
    url: '/projectbase/projectplanbase/' + id + '/release/',
    method: 'put'
  })
  return resp
}

export async function closeProjectPlanBaseApi(id) {
  var resp = await request({
    url: '/projectbase/projectplanbase/' + id + '/close/',
    method: 'put'
  })
  return resp
}
